<?php
namespace app\admin\controller;
class Datadictcate extends \app\admin\controller\Common{

    public function add(){
        if (request()->isGet()) {
            $this -> fetchform();
        }elseif (request()->isPost()) {
            $this -> ebadd();
        }
    }

    public function edit(){
        $this -> ebedit();
    }

    public function delete(){
        if (request() -> isPost()) {
            $config = [
                'relation' => [
                    'datadict' => [
                        'type' => 'hasmany',
                    ],
                ],
            ];
            $this -> ebdelete($config);
        }
    }

}